package com.payment.service.alast;

import com.payment.config.dto.ResultDataDto;
import com.payment.entity.alast.filterpayment.request.RequestFilterPayment;
import com.payment.entity.alast.paypalpay.request.RequestPayPalWebPay;
import com.payment.entity.alast.resultconfirm.request.RequestResultConfirm;
import com.payment.entity.alast.resultquery.request.RequestResultQuery;
import com.payment.entity.alast.showwechatpay.request.RequestShowWeChatPay;
import com.payment.entity.alast.stripe.autorenewal.setupintent.request.RequestStripeAutoPay;
import com.payment.entity.alast.stripe.autorenewal.subcription.cancel.request.RequestStripeSubCancel;
import com.payment.entity.alast.stripe.autorenewal.subcription.directly.request.RequestStripeSubDirectly;
import com.payment.entity.alast.stripe.onetime.request.RequestStripePay;
import com.payment.entity.alast.wxwebpay.request.RequestWeiXinWebPay;

import javax.servlet.http.HttpServletRequest;

/**
 * 1，请求支付的接口：微信H5支付接口；paypal的H5支付接口
 * 2，请求支付结果的接口：微信的支付结果；paypal的支付结果；异常延时订单的支付结果确认。
 *
 * @author lm
 * @date 2020/7/31 10:19
 */
public interface PaymentAndResultService {

    /**
     * 过滤支付接口
     *
     * @param request
     * @return
     */
    ResultDataDto filterPayment(RequestFilterPayment request);

    /**
     * 请求：获取微信网页（H5）支付权限
     *
     * @param request
     * @return
     */
    ResultDataDto wxWebPay(RequestWeiXinWebPay request, HttpServletRequest re);

    /**
     * 请求：获取payPal网页（H5）支付权限
     *
     * @param request
     * @return
     */
    ResultDataDto payPalPay(RequestPayPalWebPay request);

    /**
     * 微信或者payPal支付结果查询
     *
     * @param request
     * @return
     */
    ResultDataDto resultQuery(RequestResultQuery request);

    /**
     * 微信或者payPal支付结果确认
     *
     * @param request
     * @return
     */
    ResultDataDto resultConfirm(RequestResultConfirm request);

    /**
     * 微信支付结果回调
     *
     * @param resXml
     * @return
     */
    String wxNotify(String resXml);

    /**
     * payPal的ipn支付回调
     *
     * @param resStr
     * @throws Exception
     */

    void ipn(String resStr);

    /**
     * payPal的webHook支付回调
     *
     * @param resStr
     * @return
     */
    String webHook(String resStr);

    /**
     * stripe一次性支付结果回调
     *
     * @param request
     * @return
     */
    ResultDataDto stripeCallback(String request);

    /**
     * stripe自动续费订阅支付结果回调
     *
     * @param request
     * @return
     */
    ResultDataDto stripeAutoSubCallback(HttpServletRequest re, String request);

    /**
     * 获取展示微信支付的渠道集合
     *
     * @param request
     * @return
     */
    ResultDataDto showWeChatPay(RequestShowWeChatPay request);

    /**
     * 请求：获取Stripe收银台一次性支付权限
     *
     * @param request
     * @return
     */
    ResultDataDto stripePay(RequestStripePay request);

    /**
     * 获取stripe收银台自动续费支付权限
     *
     * @param request
     * @return
     */
    ResultDataDto stripeAutoPay(RequestStripeAutoPay request);

    /**
     * 获取stripe收银台自动续费直接订阅
     *
     * @param request
     * @return
     */
    ResultDataDto stripeSubDirectly(RequestStripeSubDirectly request);

    /**
     * 获取stripe收银台自动续费取消订阅
     *
     * @param request
     * @return
     */
    ResultDataDto stripeSubCancel(RequestStripeSubCancel request);
}
